package com.singzi.testCase;

import com.sun.org.apache.xerces.internal.impl.dv.util.ByteListImpl;
import org.junit.Test;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;

public class ListTest {
    @Test
    public void addTest(){
        List<Integer> list = new ArrayList<>();
        list.add(1);
        list.add(2);
        int []objects = new int[list.size()];
        for(int i = 0;i < list.size();i++) {
            objects[i] = list.get(i);
        }


        for(Integer num:objects){
            System.out.println(num);
        }
        System.out.println(list.get(1));
    }
    @Test
    public void l22inkedTest(){
        LinkedList<Integer> list = new LinkedList<>();
        list.add(1);
        list.add(2);
        list.push(3);
        list.add(2,8);
        list.add(2,22);

        System.out.println(list.get(2));
    }
    @Test
    public void LinkedTest(){
        HashMap<Integer, int[]> map = new HashMap<>();
    }
    @Test
    public void sizeTest(){
        List<Integer> list = new ArrayList<>(5);
        System.out.println(list.size());

    }
    @Test
    public void test02(){
        List<Double> list = new ArrayList<>();
    }


}
